<?
################################################################################
##                                                                            ##
##   Copyright 2002 Fineware, Inc. All rights reserved.                       ##
##   Version : Release 2, 1109                                                ##
##                                                                            ##
##                                                                            ##
################################################################################

#Database constants

//local host
/*
Define("_HOST","localhost");
Define("_DATABASE","tcheung");
Define("_USERNAME","tcheung");
Define("_PASSWORD","25578249");
*/

Define("EN_HOST","localhost");
Define("EN_DATABASE","joneskydb_en");
if (preg_match("/hk-ed\.com$/i", $_SERVER['HTTP_HOST'])) {
	Define("EN_USERNAME","root");
	Define("EN_PASSWORD","111111");
} else {
	Define("EN_USERNAME","root");
	Define("EN_PASSWORD","111111");
}

Define("JP_HOST","localhost");
Define("JP_DATABASE","joneskydb_en");
if (preg_match("/hk-ed\.com$/i", $_SERVER['HTTP_HOST'])) {
	Define("JP_USERNAME","root");
	Define("JP_PASSWORD","111111");
} else {
	Define("JP_USERNAME","root");
	Define("JP_PASSWORD","111111");
}




#Special Config   
Define("_TITLE","Venus");
Define("_ADMIN","");
Define("_ADMINEMAIL","");
//Define ("_COPYRIGHT","Copyright &copy; Fineware, all rights reserved.");

#CSS Plug-in
Define("_CSS","css.css");

#Color Setting


#Session
session_start();


#Validate User
$VALIDATE_USER = "yes";


$FILETYPE = ".php";

$COPYRIGHT = "Copyright &copy; iMaker Solutions Limited, all rights reserved.";

global $PIC_DIR;

if (isset($_SESSION['lang'])&&$_SESSION['lang']=='JP')
	$PIC_DIR='../japan/pictures/';
else $PIC_DIR = "../pictures/";

$nav_target = array(
  "product/product_main",
  "customer/customer_main",
  "media/media_main",
//  "report/report_main",
  "myaccount/myaccount",
  "user/info/user_menu",  
);

function encrypt($str,$key) {
//encrypt , for safty
	$k='';
	$p=strlen($key);
	for ($i=0;$i<strlen($str);$i++) {
		$k.=$key[$p-$i%$p-1];
	}
	$str=$str ^ $k;
	return $str;
}//:~end of encrypt()

function myMail($subject,$html,$text,$tomail){
      $boundary = uniqid( "");
      $headers = "From: \"Jonesky (H.K.) Limited\" <js-shop@jonesky.com.hk>\nContent-type: text/html; charset=big5";
      return @mail($tomail, $subject, $html, $headers);
}//:~end of function myMail()
?>